package com.it.archives.controller;

import com.it.archives.model.User;
import com.it.archives.rpc.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@ResponseBody
@RestController
public class UserController {

    @Autowired
    UserService userService;

    //1
    @RequestMapping("queryUserList")
    public List<User> queryUserList(User user){
        return userService.queryList(user);
    }

    @RequestMapping("queryUserListByParam")
    public List<User> queryUserListByParam(User user){
        return userService.queryUserListByParam(user);
    }
}
